import { adminBaseRoutePath } from '/@/router/static/adminBase'
import createAxios from '/@/utils/axios'

const refundUrl = adminBaseRoutePath + '/shop.order.refund/'
const addressUrl = adminBaseRoutePath + '/shop.delivery.address/'

//售后审核
export function auditRefundOrder(params: anyObj) {
    return createAxios(
        {
            url: refundUrl + 'audit',
            method: 'post',
            params,
        },
        {
            showSuccessMessage: true,
        }
    )
}

//退款
export const receive = (params: anyObj) => {
    return createAxios(
        {
            url: refundUrl + 'receive',
            method: 'post',
            params,
        },
        {
            showSuccessMessage: true,
        }
    )
}

//获取地址列表
export function getRefundAddress() {
    return createAxios({
        url: addressUrl + 'refund',
        method: 'get',
    })
}
